﻿using DryIoc;
using KinonekoSoftware.Studio.ViewModels;

namespace KinonekoSoftware.Studio.Models.Shells
{
    
    public class JuXiaoYouLaunchJob
    {
        public JuXiaoYouLaunchJobHandler Handler     { get; init; }
        public string                    Description { get; init; }
        public Task Run()
        {
            if (Handler is null)
            {
                return Task.Delay(100);
            }
            
            
            var container = Ioc.Container;
            var shell     = Ioc.Get<AppViewModel>();
            return Handler(shell, container, shell.LaunchContext);
        }
    }
}